package com.xcdh.orm.service.ddl.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xcdh.domain.RequestPage;
import com.xcdh.orm.ddl.DDLTable;
import com.xcdh.orm.mapper.ddl.mysql.MysqlDDLTableMapper;
import com.xcdh.orm.service.ddl.DDLTableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * OracleDDLTableService
 * Created by wjg on 2023/11/30.
 */
@Service("mysqlDDLTableService")
public class MysqlDDLTableServiceImpl implements DDLTableService {
    @Autowired
    private MysqlDDLTableMapper mysqlDDLTableMapper ;

    @Override
    public List<DDLTable> showTables() {
        return mysqlDDLTableMapper.showTables();
    }

    @Override
    public List<DDLTable> queryTables (DDLTable table) {
        return mysqlDDLTableMapper.queryTables(table);
    }

    @Override
    public IPage<DDLTable> pageTable(RequestPage<DDLTable> table) {
        return mysqlDDLTableMapper.pageTable(table);
    }

    @Override
    public int dropTable(DDLTable table) {
        return mysqlDDLTableMapper.dropTable(table);
    }

    @Override
    public int createTable(DDLTable table) {
        return 0;
    }

    @Override
    public int copyTable(DDLTable table) {
        return mysqlDDLTableMapper.copyTable(table);
    }
}
